function F = ReferenceFullFeatures(P,features,mode,action)
        
    % feature vector variables
    global num_tilings;
    
    global num_players_r;
    global num_players_b;

    distances_vec = {0 0 0 0 0 0 0 0 0 0};
    angles_vec = {0 0 0 0 0 0 0 0 0 0};
    
    ball_x = features(1:num_tilings);
    offset = num_tilings;
    
    ball_y = features((num_tilings+1):(2*num_tilings));
    offset = offset + num_tilings;

    for i = 1:(num_players_r+num_players_b)
        distances_vec{i} = features((offset+1):(offset+num_tilings));
        offset = offset + num_tilings;
        
    end
    
    for i = 1:(num_players_r+num_players_b)
        angles_vec{i} = features((offset+1):(offset+num_tilings));
        offset = offset + num_tilings;
    end
    
        % Get the final feature vector for each individual action
    P_num = P{3};
    
    if(action==1) % Dribble; gives coordinates of the ball, the player, and relative distances and angles to all the opponents
        F = [ball_x, ball_y, distances_vec{P_num}, angles_vec{P_num}, distances_vec{(1+num_players):(num_players + num_opponents)}, angles_vec{(1+num_players):(num_players + num_opponents)}];
    
    elseif(action>1 && action <= (1+num_players)) % PassBall(k); gives features of ball, player, features of team-mate k; features of all opponents    
        k = action -1;
        F = [ball_x, ball_y, distances_vec{P_num}, angles_vec{P_num}, distances_vec{k}, angles_vec{k}, distances_vec{(1+num_players):(num_players + num_opponents)}, angles_vec{(1+num_players):(num_players + num_opponents)}];

    elseif(action == (2+num_players)) % GetOpen; gives features for the player and all the opponents
        F = [distances_vec{P_num}, angles_vec{P_num}, distances_vec{(1+num_players):(num_players + num_opponents)}, angles_vec{(1+num_players):(num_players + num_opponents)}];
        %F = [ball_x, ball_y, distances_vec{P_num}, angles_vec{P_num}];
    elseif(action == (3+num_players)) % GoToBall; gives features of player; gives features of player and the ball
        F = [ball_x, ball_y, distances_vec{P_num}, angles_vec{P_num}];
        %F = [ball_x, ball_y, distances_vec{1:num_players}, angles_vec{1:num_players}]; % location of the ball + locations of all temmates
    else % BlockPass(k); gives features for the player and the player k to be blocked
        k = action - (3+num_players); 
        F = [distances_vec{P_num}, angles_vec{P_num}, distances_vec{k+num_players}, angles_vec{k+num_players}];        
        %F = [distances_vec{1:num_players}, angles_vec{1:num_players}, distances_vec{k+num_players}, angles_vec{k+num_players}];        
    end
    
end